package 面试题;

import java.util.Scanner;

public class Reverse {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String[] strs = s.split(" ");
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < strs.length; i++) {
            char[] chars = strs[i].toCharArray();
            for (int j = chars.length-1; j >= 0 ; j--) {
                sb.append(chars[j]);
            }
            sb.append(" ");
        }
        sb.delete(sb.length()-1,sb.length());
        System.out.println(sb);
    }
}
